package DieSiedler;
/*
 * BaukostenDialog.java
 *
 * Created on 14. April 2007, 07:37
 */

import java.awt.*;

import javax.swing.*;
import javax.imageio.*;
import java.io.*;
/**
 * Zeigt ein Dialog mit den Baukosten an.
 * @author  Michi
 */
public class BaukostenDialog extends javax.swing.JDialog {
    private Image bild;
    /**
     * Creates new form BaukostenDialog
     */
    public BaukostenDialog(java.awt.Frame parent, boolean modal) {
        super(parent, modal);
        setTitle("Baukosten");
        initComponents();
        bild  = Toolkit.getDefaultToolkit().createImage(getClass().getResource("/DieSiedler/Bilder/baukosten.gif"));
        /*
        try{        	
            bild  = ImageIO.read(new File(getClass().getResource("/DieSiedler/Bilder/baukosten.gif").getFile()));
        }
        catch(IOException e){
        }
        */
        setLocation(500,200);
        setSize(478, this.getInsets().top+472);
        this.setForeground(Color.white);
        setBackground(Color.white);
        //setSize(bild.getWidth(null), this.getInsets().top+bild.getHeight(null));
        setResizable(false);
        setVisible(true);
    }
    
    public void paint(Graphics g){
        g.setColor(Color.darkGray);
        g.fillRect(0, this.getInsets().top, bild.getWidth(null), bild.getHeight(null));
       	g.drawImage(bild, 0, this.getInsets().top, bild.getWidth(null), bild.getHeight(null), this);
    }
    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    // <editor-fold defaultstate="collapsed" desc=" Erzeugter Quelltext ">//GEN-BEGIN:initComponents
    private void initComponents() {

        getContentPane().setLayout(null);

        setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
        pack();
    }// </editor-fold>//GEN-END:initComponents
    
    /**
     * @param args the command line arguments
     */
    public static void main(String args[]) {
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                new BaukostenDialog(new javax.swing.JFrame(), true).setVisible(true);
            }
        });
    }
    
    // Variablendeklaration - nicht modifizieren//GEN-BEGIN:variables
    // Ende der Variablendeklaration//GEN-END:variables
    
}
